package com.baizhi.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.Date;

/**
 * 评论(Comment)表实体类
 *
 * @author makejava
 * @since 2021-09-28 14:40:41
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@TableName("comment")
@SuppressWarnings("serial")
public class Comment extends Model<Comment> {
    @TableId(type = IdType.AUTO, value = "id")
    private Integer id;

    //用户id
    @TableField("uid")
    private Integer uid;

    //视频id
    @TableField("video_id")
    private Integer videoId;

    //内容
    @TableField("content")
    private String content;

    //父评论id
    @TableField("parent_id")
    private Integer parentId;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("created_at")
    private Date createdAt;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("updated_at")
    private Date updatedAt;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("deleted_at")
    private Date deletedAt;


}

